package service;

import vo.Book;
import vo.PageBean;

import java.sql.SQLException;
import java.util.List;

public interface IBookService {
//    List<Book> getNew() throws SQLException;
//
//    PageBean<Book> getByPage(Integer currPage) throws SQLException;
//
//    PageBean<Book> getByName(String name)throws SQLException;

    void addBook(Book book);

    void deleteBook(Integer id);
//
//    void updateBook(Book book) throws SQLException;

    Book selectBookById(int bookId);

    List<Book> getAllBook();

    /*
    * @description:当用户付款时，根据订单号将库存中书的数量改变,当state=add时，加库存，当state=cut时，减库存
    * @param [orderId,state]
    * @return void
    */
    void changeInventory(int orderId,String state);
}
